Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nix from the public API #182

Merged
merged 2 commits into from
May 1, 2024
Merged

Remove nix from the public API #182

merged 2 commits into from
May 1, 2024

Conversation

notgull
Copy link
Member

@notgull notgull commented Apr 25, 2024

This commit removes nix from the public API. nix has frequent breaking
changes due to the large API surface it covers, which makes it a semver
hazard to keep it in the public API.

Thus far only two items from nix are exposed: Signal and siginfo. Signal
is an enum consisting of most real-life Unix signals. I have replaced it
with a hand rolled enum primarily taken from the one in async-signal.
For the other case, the Event structure exposes most of the relevant
fields. So I've turned these fields into accessors. We can PR more
later.

This is a breaking change, but it's in service of avoiding breaking
changes in the future.

Closes #179

This commit removes nix from the public API. nix has frequent breaking
changes due to the large API surface it covers, which makes it a semver
hazard to keep it in the public API.

Thus far only two items from nix are exposed: Signal and siginfo. Signal
is an enum consisting of most real-life Unix signals. I have replaced it
with a hand rolled enum primarily taken from the one in async-signal.
For the other case, the Event structure exposes most of the relevant
fields. So I've turned these fields into accessors. We can PR more
later.

This is a breaking change, but it's in service of avoiding breaking
changes in the future.

Closes #179

Signed-off-by: John Nunley <[email protected]>
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.36%. Comparing base (dd30cfe) to head (32e66cd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #182   +/-   ##
=======================================
  Coverage   85.36%   85.36%           
=======================================
  Files          14       14           
  Lines        1858     1858           
=======================================
  Hits         1586     1586           
  Misses        272      272           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@notgull notgull requested a review from ids1024 April 27, 2024 14:40
Copy link
Member

@elinorbgr elinorbgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, lgtm. Nix in public API has long be a pain.

@notgull notgull merged commit a3a4941 into master May 1, 2024
14 checks passed
@notgull notgull mentioned this pull request Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make nix not a public dependency
3 participants